// 导入以下包防止ElMessage组件失效
//import 'element-plus/es/components/message/style/css'
// 从 element-plus 导入 ElMessage
//import { ElMessage, ElMessageBox } from 'element-plus';
// 页面加载动画条包
import nProgress from 'nprogress';


//消息提示
export function showMessage(message = '提示消息', type = 'success', customClass = '') {
    return ElMessage({
        type: type,
        message: message,
        customClass: customClass,
    })
}

// 显示页面加载 loading
export function showPageLoading(){
    nProgress.start()
}

// 隐藏页面加载 Loading
export function hidePageLoading(){
    nProgress.done()
}

// 弹出确认框
export function showModel(content = '提示内容', type = 'warning', title = '') {
    return ElMessageBox.confirm(
        content,
        title,
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type,
        }
    )
}

// test弹出确认框
export function testShowModel(content = '提示内容', type = 'warning', title = '') {
    return ElMessageBox.confirm(
        content,
        title,
        {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type,
        }
    )
}